package com.easy.easy.Service.impl;

import com.easy.easy.Service.IOrderAddressService;
import com.easy.easy.bean.Orderaddress;
import com.easy.easy.bean.Useraddress;
import com.easy.easy.dao.OrderDao;
import com.easy.easy.dao.OrderaddressDao;
import com.easy.easy.util.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

@Service
public class OrderAddressServiceimpl implements IOrderAddressService {

    @Autowired
    OrderaddressDao orderaddressDao;

    @Override
    public int add(Orderaddress orderaddress) {
        return orderaddressDao.add(orderaddress);
    }

    @Override
    public int edit(Orderaddress orderaddress) {
        return orderaddressDao.edit(orderaddress);
    }

    @Override
    public int delete(int orderid, int userid) {
        return orderaddressDao.delete(orderid, userid);
    }

    @Override
    public List<Orderaddress> getList(Page page, String text, int userid) {
        return orderaddressDao.getList(page, text, userid);
    }

    @Override
    public Orderaddress getOrderById(int orderid, int userid) {
        return orderaddressDao.getOrderById(orderid, userid);
    }

    @Override
    public int getCount(String text, int userid) {
        return orderaddressDao.getCount(text, userid);
    }

    @Override
    public Orderaddress getOrder(Orderaddress orderaddress) {
        return orderaddressDao.getOrder(orderaddress);
    }

    @Override
    public List<Orderaddress> getAddressByUserID(int userid) {
        return orderaddressDao.getAddressByUserID(userid);
    }
}
